﻿<Page
    x:Class="CodeAbility.MonitorAndCommand.Windows8Monitor.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:CodeAbility.MonitorAndCommand.Windows8Monitor"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:charting="using:WinRTXamlToolkit.Controls.DataVisualization.Charting" 
    xmlns:converters="using:CodeAbility.MonitorAndCommand.Windows8Monitor.Converters"
    xmlns:usercontrols="using:CodeAbility.MonitorAndCommand.Windows8Monitor.UserControls"
    mc:Ignorable="d">

    <!-- http://eren.ws/2013/10/15/using-graphs-and-charts-in-windows-store-apps-boredom-challenge-day-11/ -->

    <Page.Resources>
        <converters:ConnectedToStringConverter x:Key="ConnectedToString"/>
        <converters:BooleanToBrushConverter x:Key="BooleanToBrush"/>
        <converters:BooleanToOpacityConverter x:Key="BooleanToOpacity"/>
        <converters:VoltageToOpacityConverter x:Key="VoltageToOpacity"/>
        <Style x:Key="ButtonStyle" TargetType="Button">
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Margin" Value="2"/>
            <Setter Property="FontSize" Value="32"/>
            <Setter Property="Width" Value="500"/>
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="Margin" Value="20"/>
        </Style>
    </Page.Resources>

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"></ColumnDefinition>
            <ColumnDefinition Width="2*"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>

        <StackPanel Grid.Row="1" Grid.Column="1">
            <Button Content="MCP4921 on Netduino 3 Wifi" 
                    HorizontalAlignment="Center" 
                    Style="{StaticResource ButtonStyle}"
                    Click="MCP4921Button_Click"/>
            <Button Content="Photons" 
                    HorizontalAlignment="Center" 
                    Style="{StaticResource ButtonStyle}"
                    Click="PhotonsButton_Click"/>
            <Grid Width="300">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <TextBlock Grid.Row="0" Text="IP Address"/>
                <TextBox x:Name="IpAddressTextBox" Grid.Row="1"/>
            </Grid>
        </StackPanel>

    </Grid>
</Page>